Warning: mkdir(): No space left on device in /var/www/tg-me/post.php on line 37

Warning: file_put_contents(aCache/aDaily/post/vuejs_ru/--): Failed to open stream: No such file or directory in /var/www/tg-me/post.php on line 50
Александр www in Vue.js — русскоговорящее сообщество | Telegram Webview: vuejs_ru/1610778 -
Telegram Group & Telegram Channel
Всем привет, подскажите как 2 роутера использовать во Vue:

import router from './routes';
import adminRouter from './admin/routes';

createApp(App)
.use(router)
.use(adminRouter);


admin/router/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AdminLayout from "../layouts/AdminLayout.vue";
import Orders from '../pages/Orders.vue';

const routes = [
{ path: '/', component: AdminLayout, children: [
{ path: '/orders', name: 'AdminOrders', component: Orders, meta: {title: 'Заявки'} },
]
},
];

const adminRouter = createRouter({
history: createWebHistory('/admin'),
routes,
});

export default adminRouter;


routes/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AppLayout from "../layouts/AppLayout.vue";
import Main from '../pages/Main.vue';

const routes = [
{ path: '/', component: AppLayout, children: [
{ path: '/', name: 'Main', component: Main, meta: {title: 'Главная'} },
]
},
];

export default router;


Так вообще можно делать?? В консоли всякие ошибки



tg-me.com/vuejs_ru/1610778
Create:
Last Update:

Всем привет, подскажите как 2 роутера использовать во Vue:

import router from './routes';
import adminRouter from './admin/routes';

createApp(App)
.use(router)
.use(adminRouter);


admin/router/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AdminLayout from "../layouts/AdminLayout.vue";
import Orders from '../pages/Orders.vue';

const routes = [
{ path: '/', component: AdminLayout, children: [
{ path: '/orders', name: 'AdminOrders', component: Orders, meta: {title: 'Заявки'} },
]
},
];

const adminRouter = createRouter({
history: createWebHistory('/admin'),
routes,
});

export default adminRouter;


routes/index.js:
import { createRouter, createWebHistory } from 'vue-router';
import AppLayout from "../layouts/AppLayout.vue";
import Main from '../pages/Main.vue';

const routes = [
{ path: '/', component: AppLayout, children: [
{ path: '/', name: 'Main', component: Main, meta: {title: 'Главная'} },
]
},
];

export default router;


Так вообще можно делать?? В консоли всякие ошибки

BY Александр www in Vue.js — русскоговорящее сообщество


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/vuejs_ru/1610778

View MORE
Open in Telegram


Vue js — русскоговорящее сообщество Telegram | DID YOU KNOW?

Date: |

How Does Telegram Make Money?

Telegram is a free app and runs on donations. According to a blog on the telegram: We believe in fast and secure messaging that is also 100% free. Pavel Durov, who shares our vision, supplied Telegram with a generous donation, so we have quite enough money for the time being. If Telegram runs out, we will introduce non-essential paid options to support the infrastructure and finance developer salaries. But making profits will never be an end-goal for Telegram.

Mr. Durov launched Telegram in late 2013 with his brother, Nikolai, just months before he was pushed out of VK, the Russian social-media platform he founded. Mr. Durov pitched his new app—funded with the proceeds from the VK sale—less as a business than as a way for people to send messages while avoiding government surveillance and censorship.

Vue js — русскоговорящее сообщество from in


Telegram Александр www in Vue.js — русскоговорящее сообщество
FROM USA